package com.hackintosh.state.student;

/**
 * @description：
 * @author：twislyn
 * @date：Created in 2021/05/23
 * @modified By：
 * @version: 1.0
 */
public class MiddleState extends AbstractState {
    public MiddleState(AbstractState state) {
        this.stateName = "一般";
        this.scoreContext = state.scoreContext;
        this.score = state.score;
    }

    @Override
    public void checkState() {
        if (score > 90) {
            this.scoreContext.setState(new HighState(this));
        } else if (score < 60) {
            this.scoreContext.setState(new LowState(this));
        }
    }
}
